#!/usr/bin/env bash
export REDIS_IMAGE=${REDIS_IMAGE:="redis"}
export REDIS_IMAGE_VERSION=${REDIS_IMAGE_VERSION:="5.0.7"}
export REDIS_ROOT=${REDIS_ROOT:="$DOKKU_LIB_ROOT/services/redis"}
export REDIS_HOST_ROOT=${REDIS_HOST_ROOT:=$REDIS_ROOT}

export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
export PLUGIN_COMMAND_PREFIX="redis"
export PLUGIN_CONFIG_ROOT=${PLUGIN_CONFIG_ROOT:="$DOKKU_LIB_ROOT/config/$PLUGIN_COMMAND_PREFIX"}
export PLUGIN_DATA_ROOT=$REDIS_ROOT
export PLUGIN_DATA_HOST_ROOT=$REDIS_HOST_ROOT
export PLUGIN_DATASTORE_PORTS=(6379)
export PLUGIN_DATASTORE_WAIT_PORT=6379
export PLUGIN_DEFAULT_ALIAS="REDIS"
export PLUGIN_DISABLE_PULL=${REDIS_DISABLE_PULL:=}
export PLUGIN_DISABLE_PULL_VARIABLE="REDIS_DISABLE_PULL"
export PLUGIN_ALT_ALIAS="DOKKU_REDIS"
export PLUGIN_IMAGE=$REDIS_IMAGE
export PLUGIN_IMAGE_VERSION=$REDIS_IMAGE_VERSION
export PLUGIN_SCHEME="redis"
export PLUGIN_SERVICE="Redis"
export PLUGIN_VARIABLE="REDIS"
export PLUGIN_BASE_PATH="$PLUGIN_PATH"
export PLUGIN_CONFIG_SUFFIX="config"
if [[ -n $DOKKU_API_VERSION ]]; then
  export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH"
fi

export PLUGIN_BUSYBOX_IMAGE="busybox:1.31.1-uclibc"
export PLUGIN_AMBASSADOR_IMAGE="dokku/ambassador:0.3.3"
export PLUGIN_S3BACKUP_IMAGE="dokku/s3backup:0.10.3"
export PLUGIN_WAIT_IMAGE="dokku/wait:0.4.3"
